/* Author: Vincent Acuna
 * Description:
 * The MovesLog class essentially only holds an ArrayList of Moves which
 * we will use during replays.
 * 
 */
import java.util.ArrayList;


public class MovesLog
{
	public ArrayList<ArrayList<Move>> moveList; //The arrayList we will be holding Moves in
	public ArrayList<Board> initialBoards;
	int turns;
	
	public MovesLog() //Constructor
	{
		moveList=new ArrayList<ArrayList<Move>>();
		moveList.add(new ArrayList<Move>()); //initial move
		turns=0;
	}
	
	public void addTurn()
	{
		moveList.add(new ArrayList<Move>());
	}
	
	public void addMove(Move J)
	{
		moveList.get(turns).add(J);
	}
	public void clearMoves()//Clears all Moves
	{
		moveList.clear();
	}
	
	public Move getMove(int turn,int move) //Return a specific move
	{
		return moveList.get(turn).get(move);
	}
	
	public ArrayList<Move> getTurn(int turn)//returns all the moves at a certian turn
	{
		return moveList.get(turn);
	}

	public void setInitialBoard(ArrayList<Board> initial)
	{
		//sets the initial board
		initialBoards = initial;
		
	}
	public void nextTurn()
	{
		addTurn();
		turns++;
	}
}
